package priv.pront.code.mati.province;

import java.util.Scanner;

/**
 * @Description:
 * @Author: pront
 * @Time:2023-11-17 10:57
 */
public class MC0209_神秘门的密码 {

    static String s;
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        s = scanner.next();
        if (s.length() % 2 == 0) {
            String pre = s.substring(0, s.length() / 2);
            StringBuilder sb = new StringBuilder(pre);
            String last = s.substring(s.length() / 2);
            for (int i = last.length() - 1; i >= 0 ; i--) {
                sb.append(last.charAt(i));
            }
            System.out.println(sb);

        }else{
            System.out.println(123456);
        }
    }
}
